package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.example.model.User;

import java.util.List;

@Mapper
public interface UserMapper {
    //查询所有用户
    List<User> getAll();
    //插入一行用户信息
    int insertOne(User user);

    //根据主键修改其他字段
    int updateOne(User user);

    int deleteById(Integer id);

    List<User> selectLike(String username);

    List<User> selectOrderBy(String orderBy);

    List<User> selectUserAndArticle();

    List<User> selectByCondition(User user);

    int deleteByIds(List<Integer> ids);
}
